import { createBrowserRouter } from 'react-router-dom'
import Home from '../pages/home/Index'
import Index from '../pages/index/Index'
import Order from '../pages/order/Index'
import User from '../pages/user/Index'
import Uu from '../pages/user/uu/Index'
import Ss from '../pages/user/ss/Index'
import {
    DesktopOutlined,
    FileOutlined,
    PieChartOutlined,
    TeamOutlined,
    UserOutlined,
} from '@ant-design/icons';
export const homerouters = [
    {
        path: '/home/index',
        element: <Index />,
        title: '首页',
        icon: <DesktopOutlined />
    },
    {
        path: '/home/order/:id',
        element: <Order />,
        title: '管理',
        icon: <FileOutlined />
    },
    {
        path: '/home/user',
        element: <User />,
        title: '用户',
        icon: <PieChartOutlined />,
        children: [
            {
                path: '/home/user/uu',
                element: <Uu />,
                title: 'uu用户',
            },
            {
                path: '/home/user/ss',
                element: <Ss />,
                title: 'ss用户',
            }
        ]
    }
]
const router = createBrowserRouter([
    {
        index: true,
        element: <Home />
    },
    {
        path: '/home',
        element: <Home />,
        children: homerouters
    }
])
export default router